home *** CD-ROM | disk | FTP | other *** search
/ Hackers Handbook - Millenium Edition / Hackers Handbook.iso / library / hack99 / 95replay.txt < prev    next >
Encoding:
Text File  |  1999-03-24  |  4.7 KB  |  122 lines

  1.  
  2.  
  3.  
  4.                           L0pht Security Advisory
  5.  
  6.                        Advisory released Jan. 5, 1999
  7.              Application: Windows 95/98 Network File Sharing
  8.               Severity: Sniffed authentications can be used
  9.                        to impersonate network users
  10.  
  11.                          Author: weld@l0pht.com
  12.  
  13.                    http://www.l0pht.com/advisories.html
  14.  
  15.  
  16.  
  17. Overview :
  18.  
  19.   Windows 95/98 network file sharing reuses the cryptographic challenges
  20.   used in SMB challenge/response authentication.  The reuse of the
  21.   challenge enables an attacker, who has captured a legitimate
  22.   network authentication, to replay the authentication and establish
  23.   a connection impersonating a valid user.
  24.  
  25. Description :
  26.  
  27.   During testing of the L0phtCrack 2.5 SMB packet capture tool to capture
  28.   SMB challenge/response authentication, it became apparent to the 
  29.   L0phtCrack development team that Windows 95/98 issues the exact same
  30.   challenge for each authentication for a period of approximately 15
  31.   minutes.  During this time an attacker can connect to a network share
  32.   as the user whose authentication was captured.
  33.  
  34.   The attacker can connect to the Win95/98 share as that user because the
  35.   user name is transmitted in the clear as well as the challenge.  
  36.   Although the attacker does not know the user's password and therefore
  37.   cannot generate the encrypted password hash from it, the attacker does
  38.   not have to.  She merely replays the encrypted hash that she captured.  
  39.   It will be correct because the challenge hasn't changed and she is
  40.   impersonating that particular user.
  41.    
  42.   Reusing a challenge is a classic cryptographic mistake.  If the
  43.   challenge was simply incremented this attack would not be possible.
  44.  
  45. Details :
  46.  
  47.   The following captures are in L0phtCrack 2.5 capture format specified
  48.   as: 
  49.  
  50. DOMAIN\username:3:challenge:encrypted LANMAN hash:encrypted NTLM hash
  51.  
  52.   The following 2 captures show an NT machine connecting to another NT
  53.   machine. The challenge is different, as it should be, for each
  54.   authentication.
  55.  
  56. DOMAIN\user:3:c21ee5e0c1a8ae89:626cc3ec9f8f1849bbd645541477be48bf261b486
  57. 9c36e7a:f9dfdb9ee9d1705a4fd45a0ed5f2c62e0c7a957860a59559
  58.  
  59. DOMAIN\user:3:ce16b6d32eee2e29:8f96e377f2b9670fa425c4e52ae4ae6ae3e23f693
  60. d518719:d9a3180ce6e30f8a12d46703847147b70066dbaf9a5b654e
  61.  
  62.   The following 2 captures show an NT machine connecting to a Win98
  63.   machine.  Notice that the same challenge is issued each time.
  64.  
  65. DOMAIN\user:3:8f2eceae79b55000:43caa3ff5c793d04bbbe2332e8918bf80735b0100
  66. 89dc573:1c592e5dcf78cf658829d0cbe61c0e4c32b5ed7a87f5097e
  67.  
  68. DOMAIN\user:3:8f2eceae79b55000:43caa3ff5c793d04bbbe2332e8918bf80735b0100
  69. 89dc573:1c592e5dcf78cf658829d0cbe61c0e4c32b5ed7a87f5097e
  70.  
  71.   This capture is another NT machine connecting to the same Win98
  72.   machine used above. Notice this is the same challenge as in the
  73.   previous 2 authentications.
  74.  
  75. DOMAIN\user:3:8f2eceae79b55000:43caa3ff5c793d04bbbe2332e8918bf80735b0100
  76. 89dc573:1c592e5dcf78cf658829d0cbe61c0e4c32b5ed7a87f5097e
  77.  
  78.   As you can see from the last 3 captures, if the username and challenge
  79.   are the same then the encrypted hashes sent are the same.
  80.  
  81. Implementation :
  82.  
  83.   An attacker could modify the unix Samba client to alter the way it
  84.   issues encrypted password hashes.  It could be modified to send
  85.   a fixed encrypted password hash as entered by the attacker instead
  86.   of generating it based on a password and the challenge.  In this way
  87.   the attacker could feed the output of an SMB packet capture into
  88.   a modified Samba client to make Win95/98 file share connections from
  89.   her machine.  
  90.  
  91.   Once these connections are made, interesting files could be read from
  92.   or written to the Win95/98 machines.  Files that could be written 
  93.   include those in the Windows Startup folder which would enable
  94.   programs to install themselves to automatically execute on system
  95.   startup.
  96.  
  97. Conclusion :
  98.  
  99.   This vulnerability comes at a time when many in the security
  100.   community are waking up to the fact that a Win95/98/NT specific virus
  101.   could spread rapidily by taking advantage of flaws in network 
  102.   authentication.  The recent "Remote Explorer" virus did not take
  103.   advantage in flaws in network authentication.  It took advantage
  104.   of poor Domain Administrator practice.
  105.  
  106.   Some day a virus will take advantage of flaws such as the 
  107.   aforementioned Win95/98 network impersonation or perhaps the cracking
  108.   of network authentication that L0phtCrack 2.5 performs so 
  109.   effortlessly.  Weak network security implementation and weak passwords
  110.   will be the culprits. L0phtCrack is designed to help defeat the
  111.   latter.     
  112.    
  113.  
  114. weld@l0pht.com
  115. ---------------
  116. For more L0pht (that's L - zero - P - H - T) advisories check out:
  117. http://www.l0pht.com/advisories.html
  118. ---------------
  119.  
  120.  
  121.  
  122.